import Vue from 'vue'
import Router from 'vue-router'
import Login from './components/Login'
import LoginMsg from './components/LoginMessage'
Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/login',
            name: 'login',
            component: Login,
            meta: {
                title: '松鼠AI-中小学在线辅导'
            }
        },
        {
            path: '/loginMsg',
            name: 'loginMsg',
            component: LoginMsg,
            meta: {
                title: '松鼠AI-中小学在线辅导'
            }
        },
        {
            path: '/mycourse',
            component: () => import(/* webpackChunkName: "about" */ './components/myCourse/MyCourse.vue'),
            name: '课程列表',
            meta: {
                title: '我的课程'
            }
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "about" */ './components/Login.vue'),
            meta: { requireAuth: true },
            redirect: { path: '/login' },
            children: [

                // {
                //     path: '/home',
                //     component: () => import(/* webpackChunkName: "about" */ './components/Home.vue'),
                //     name: 'home'
                // },
                // {
                //     path: '/courseadd',
                //     component: () => import(/* webpackChunkName: "about" */ './components/course/CourseAddForm.vue'),
                //     name: '课程新增'
                // },
                // {
                //     path: '/courseedit',
                //     component: () => import(/* webpackChunkName: "about" */ './components/course/CourseEditForm.vue'),
                //     name: '课程编辑'
                // },
                // {
                //     path: '/teacherlist',
                //     component: () => import(/* webpackChunkName: "about" */ './components/teacher/TeacherList.vue'),
                //     name: '老师列表'
                // },
                // {
                //     path: '/teacheradd',
                //     component: () => import(/* webpackChunkName: "about" */ './components/teacher/TeacherAddForm.vue'),
                //     name: '老师新增'
                // },
                // {
                //     path: '/teacheredit',
                //     component: () => import(/* webpackChunkName: "about" */ './components/teacher/TeacherEditForm.vue'),
                //     name: '老师编辑'
                // },
                // {
                //     path: '/about',
                //     name: 'about',
                //     component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
                // },
                // {
                //     path: '/err',
                //     name: '404页面',
                //     component: () => import(/* webpackChunkName: "about" */ './components/common/404.vue')
                // },
                // {
                //     path: '/home',
                //     component: (resolve) => {require(['@/views/pages/Home'], resolve)},
                //     name: '主页'
                // },
                // {
                //   path: '/table',
                //   name: '表格',
                //   component: (resolve) => { require(['@/views/pages/01/table'], resolve) }
                // },
                // {
                //     path: '/form',
                //     name: '表单',
                //     component: (resolve) => { require(['@/views/pages/02/form'], resolve) }
                // },
                // {
                //     path: '/chart',
                //     name: '图表',
                //     component: (resolve) => { require(['@/views/pages/03/chart'], resolve) }
                // }
            ]
        },
    ]
})
